package cn.duli.myvideo.service.Impl;

import cn.duli.myvideo.mapper.TvCommentMapper;
import cn.duli.myvideo.pojo.TvComment;
import cn.duli.myvideo.service.TvCommentService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TvCommentServiceImpl implements TvCommentService {

    @Resource
    private TvCommentMapper tvCommentMapper;

    @Override
    public Page<TvComment> findAll() {
        return tvCommentMapper.findAll();
    }

    @Override
    public List<TvComment> findByUserId(Integer uId) {
        return tvCommentMapper.findByUserId(uId);
    }

    @Override
    public List<TvComment> findByTvId(Integer tvId) {
        return tvCommentMapper.findByTvId(tvId);
    }

    @Override
    public void save(TvComment tvComment) {
        tvCommentMapper.save(tvComment);
    }

    @Override
    public void deleteById(Integer tvcId) {
        tvCommentMapper.deleteById(tvcId);
    }
}
